from django.contrib import admin
from weekly.models import *

# Register your models here.
class GroupAdmin(admin.ModelAdmin):
    list_display = ['group', 'member']

admin.site.register(Group, GroupAdmin)

class MemberAdmin(admin.ModelAdmin):
    list_display = ['member', 'number', 'group']
    ordering = ['group']

admin.site.register(Member, MemberAdmin)

class WeekAdmin(admin.ModelAdmin):
    list_display = ['week', 'article']
    ordering = ['week']

admin.site.register(Week, WeekAdmin)

class YearAdmin(admin.ModelAdmin):
    list_display = ['year', 'first_half']
    ordering = ['-year']

admin.site.register(Year, YearAdmin)

class ArticleAdmin(admin.ModelAdmin):
    list_display = ['member', 'year', 'week', 'top', 'click', 'upload_time', 'edited_time', 'doc', 'md']
    ordering = ['-edited_time']

admin.site.register(Article, ArticleAdmin)